import axios from './axios'
import resfulParamsToUrl from './resfulParamsToUrl'

//公告信息管理
//分页查询卡详情
export const cardMasterPageList = params => {
	axios.prototype._loading_ = false
	return axios.post(
		resfulParamsToUrl('/sys/noAuth/tCardMaster/getListJoinPantient', params),
		params,
	)
}
//新增
export const addAnnouncement = params => {
	axios.prototype._loading_ = false
	return axios.post(
		resfulParamsToUrl('/sys/noAuth/tCardMaster/add', params),
		params,
	)
}
//修改HIS卡
export const editCard = params => {
	axios.prototype._loading_ = false
	return axios.post(
		resfulParamsToUrl('/sys/noAuth/tCardMaster/editCard', params),
		params,
	)
}
//删除
export const deleteAnnouncement = params => {
	axios.prototype._loading_ = false
	return axios.post(
		resfulParamsToUrl('/sys/noAuth/tCardMaster/delete', params),
		params,
	)
}
//修改卡状态（RC_CARD_STATUS_DICT）
export const updateCardStatus = params => {
	axios.prototype._loading_ = false
	return axios.post(
		resfulParamsToUrl('/app/noAuth/tCardMaster/updateCardStatus', params),
		params,
	)
}
//查询绑定的卡
export const findBindCard = params => {
	axios.prototype._loading_ = false
	return axios.post(
		resfulParamsToUrl('/sys/noAuth/tCardMaster/findBindCard', params),
		params,
	)
}
//解绑卡
export const unbindCard = params => {
	axios.prototype._loading_ = false
	return axios.post(
		resfulParamsToUrl('/sys/noAuth/tCardMaster/unbindCard', params),
		params,
	)
}
//设置默认卡
export const defaultCard = params => {
	axios.prototype._loading_ = false
	return axios.post(
		resfulParamsToUrl('/sys/noAuth/tCardMaster/defaultCard', params),
		params,
	)
}
